import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
	state: {
		channelArr: [],
		catename: null,
		details: {},
		searchwords: null,
		searchObj: null,
	},
	mutations: {
		updateChannel(state, payload) {
			state.channelArr = payload.channelArr;
			state.catename = payload.catename;
		},
		updateDetails(state, payload) {
			state.details = payload.details;
		},
		getSearchwords(state, payload) {
			state.searchwords = payload.searchwords;
		},
		getSearchObj(state, payload) {
			state.searchObj = payload.searchObj;
		},
	},
	actions: {},
	modules: {}
})
